package com.xbongbong.pro.enums.errorcodes;

import com.xbongbong.i18n.util.I18nMessageUtil;
import lombok.Getter;

/**
 * 模板错误枚举
 * @author haibin
 */
@Getter
public enum TemplateErrorCodeEnum implements ErrorCode {
    API_ERROR_350001(350001, "enum.errorCode.msg.api_error_350001"),
    API_ERROR_350002(350002, "enum.errorCode.msg.api_error_350002"),
    API_ERROR_350003(350003, "enum.errorCode.msg.api_error_350003"),
    API_ERROR_350004(350004, "enum.errorCode.msg.api_error_350004"),
    API_ERROR_350005(350005, "enum.errorCode.msg.api_error_350005"),
    API_ERROR_350006(350006, "enum.errorCode.msg.api_error_350006"),
    API_ERROR_350007(350007, "enum.errorCode.msg.api_error_350007"),
    API_ERROR_350008(350008, "enum.errorCode.msg.api_error_350008"),
    API_ERROR_350009(350009, "enum.errorCode.msg.api_error_350009"),
    API_ERROR_350010(350010, "enum.errorCode.msg.api_error_350010"),
    ;

    /**
     * 错误码
     */
    private final int code;
    /**
     * 错误描述
     */
    private final String msg;

    TemplateErrorCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;

    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return I18nMessageUtil.getMessage(msg);
    }
}
